import { createRouter, createWebHashHistory } from 'vue-router';
import HOME from '../components/home/Home.vue';

const routes = [
  {
    name: 'login',
    path: '/login',
    component: () => import('../view/Login.vue'),
    meta: {
      title: '登录页',
    },
  },
  {
    name: '/',
    path: '/',
    component: HOME,
    children: [
      {
        name: 'dataV',
        path: '/dataV',
        component: () => import('../view/dataV.vue'),
      },
      {
        name: 'regional',
        path: '/regional/salesdata',
        component: () => import('../view/regional/salesdata.vue'),
      },
      {
        name: 'department',
        path: '/department/salesdata',
        component: () => import('../view/department/salesdata.vue'),
      },
      {
        name: 'personal',
        path: '/personal/salesdata',
        component: () => import('../view/personal/salesdata.vue'),
      },
      {
        name: 'ecbing',
        path: '/ecbing',
        component: () => import('../view/ecbing/src/ecbing.vue'),
      },
      {
        name: 'allform',
        path: '/allform',
        component: () => import('../view/allform/src/allform.vue'),
      },
      {
        name: 'allpk',
        path: '/allpk',
        component: () => import('../view/allpk/src/allpk.vue'),
      },
      {
        name: 'ecchartskong',
        path: '/ecchartskong',
        component: () => import('../view/ecchartskong/ecchartskong.vue'),
      },
      {
        name: 'alltb',
        path: '/alltb',
        component: () => import('../view/alltb/alltb.vue'),
      },
    ],
  },
];

const router = createRouter(
  {
    history: createWebHashHistory(),
    routes,
  },
);

export default router;